<?php
	if(session_is_registered("mail") && session_is_registered("idkh") && session_is_registered("dh")){
	
	$email=$_SESSION["mail"];
	$idkh=$_SESSION["idkh"];
	$madh=$_SESSION["dh"];
	 
	$lhkh=mysql_query("select tenkh,diachi,email,tel from customer where email='$email'");
	$ttdh=mysql_query("select maddh,ngaydat,tongtien,htttoan,dcgiaohang from tborder where maddh='$madh'");
	$ctdh=mysql_query("select product.tensp,orderdetail.slban,orderdetail.giaban,orderdetail.thanhtien from product,orderdetail where product.masp=orderdetail.masp AND orderdetail.maddh='$madh'");
	
	include("view/orderdetail.php");
	
	$rs=mysql_query("delete from cart where idkh='$idkh'");
	
	session_unregister("dh");
	session_unregister("idkh");		
	//session_destroy();
	}else{
		echo "<script language=\"javascript1.2\"> location.href=\"index.php\"</script>";
	}
?>